package com.heima.article;

import com.heima.article.service.ApArticleService;
import com.heima.model.article.dtos.ArticleDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/v2/articleClient")
public class ArticleClient {

	@Autowired
	private ApArticleService articleService;

	/**
	 *
	 * @param dto
	 * @return
	 */
	@PostMapping("/save")
	public boolean save(@RequestBody ArticleDto dto) {
		return articleService.save(dto);
	}
}
